// https://leetcode.cn/problems/permutations-ii/

/*
给定一个可包含重复数字的序列 nums ，按任意顺序 返回所有不重复的全排列。

输入：nums = [1,1,2]
输出：
[[1,1,2],
 [1,2,1],
 [2,1,1]]
*/
#include <iostream>
#include <vector>
#include <unordered_map>

using namespace std;


class Solution {
public:
    vector<vector<int>> permuteUnique(vector<int>& nums) {
		vector<vector<int>> res;
		
    }
	
	void back(vector<vector<int>> & res, vector<int> combine, int first, int len){
		if(first == len){
			res.push_back(combine);
			return;
		}
		for(int i = first; i < len; i++){
			if()
		}
		
	}
};

int main(){
	Solution so;
	vector<int> s1 = {1,2,3};
	vector<vector<int>> a = so.permuteUnique(s1);
	for(auto items : a){
		for(auto item:items){
			cout << item << ",";
		}
		cout << endl;
	}
	return 0;
}